﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Chunks
{
    class Program
    {
        static void Main(string[] args)
        {
            Region region = new Region(0, 0, 0);

            BlockInfo grass = new BlockInfo(1);
            grass.AddAttribute("snowy", false);

            BlockInfo snowyGrass = new BlockInfo(1);
            snowyGrass.AddAttribute("snowy", true);

            region.SetBlock(grass, 1, 1, 1);
            region.SetBlock(snowyGrass, 14, 15, 12);
            //Region region = new Region(Directory.GetCurrentDirectory(), "r.0.0.0.dat");

            Console.WriteLine($"{region.GetBlock(1, 1, 1)}");
            Console.WriteLine($"{region.GetBlock(14, 15, 12)}");
            Console.WriteLine($"chunk at region(0, 0, 0)'s palette: \n{region[0, 0, 0].LogPalette()}");

            region.Save(Directory.GetCurrentDirectory());
        }
    }
}
